<template>
  <div>
    <ul>
      <li v-for="(val, index) in arr" :key="index">{{ val }}</li>
    </ul>
    <button @click="btn">走走</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["帅哥", "美女", "程序员"],
    };
  },
  methods: {
    btn() {
      this.arr.unshift(this.arr[2]);
      this.arr.pop();
    },
  },
};
</script>

<style>
</style>